package com.google.code.qsecurity.shared.proxy;

import java.util.Date;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.google.code.qsecurity.client.validation.Email;
import com.google.code.qsecurity.shared.UserStatus;
import com.google.code.qsecurity.shared.UserType;
import com.google.web.bindery.requestfactory.shared.ProxyForName;
import com.google.web.bindery.requestfactory.shared.ValueProxy;

@ProxyForName(value = "com.google.code.qsecurity.server.domain.User", locator = "com.google.code.qsecurity.server.locator.UserLocator")
public interface UserProxy extends ValueProxy {

	@Email(message="{custom.email.message}")
	String getEmail();

	void setEmail(String email);

	@NotNull(message="{custom.password.null.message}")
	@Size(min=6, max=256, message="{custom.password.size.message}")
	String getHashedPassword();

	void setHashedPassword(String hashedPassword);

	@NotNull(message="{custom.name.null.message}")
	@Size(min=2, max=256, message="{custom.name.size.message}")
	String getName();

	void setName(String name);

	UserStatus getStatus();

	void setStatus(UserStatus status);

	UserType getType();

	void setType(UserType type);
	
	Date getLastLogin();
	
	void setLastLogin(Date lastLogin);
	
	Date getLastPasswordRequest();
	
	void setLastPasswordRequest(Date lastPasswordRequest);

}
